package builder;

public class MainTest5 {
    public static void main(String[] args) {
        House house = new House();
        house.setFloor("地板");
        house.setWall("墙");
        house.setRoof("屋顶");
        System.out.println(house);

        HouseBuilder singleHouseBuilder = new SingleHouseBuilder();
        singleHouseBuilder.buildFloor();
        singleHouseBuilder.buildWall();
        singleHouseBuilder.buildRoof();
        House house1 = singleHouseBuilder.finishHouse();
        System.out.println(house1);

        HouseBuilder apartmentBuilder = new ApartmentBuilder();
        House house2 = HouseDirector.build(apartmentBuilder);
        System.out.println(house2);
    }
}
